package com.zkk.utils;

import java.util.List;

public class PageBeanUtils <T>{
    private int prePage;  //上一页,由当前页减1和第一页关系得出
    private int nextPage; //下一页，由当前页加1和尾页的关系得出
    private int firstPage = 1; //首页
    private int lastPage;    //尾页
    private int currentPage = 1;  //当前页
    private int totalPage;   //总页数
    private int pageSize;   //每页显示条数
    private int totalData;  //数据总条数
    private List<T> pageData;  //数据

    public PageBeanUtils() {
    }

    public PageBeanUtils(int prePage, int nextPage, int firstPage, int lastPage, int currentPage, int totalPage, int pageSize, int totalData, List<T> pageData) {
        this.prePage = prePage;
        this.nextPage = nextPage;
        this.firstPage = firstPage;
        this.lastPage = lastPage;
        this.currentPage = currentPage;
        this.totalPage = totalPage;
        this.pageSize = pageSize;
        this.totalData = totalData;
        this.pageData = pageData;
    }

    public int getPrePage() {
        return prePage;
    }

    public void setPrePage(int prePage) {
        this.prePage = prePage;
    }

    public int getNextPage() {
        return nextPage;
    }

    public void setNextPage(int nextPage) {
        this.nextPage = nextPage;
    }

    public int getFirstPage() {
        return firstPage;
    }

    public void setFirstPage(int firstPage) {
        this.firstPage = firstPage;
    }

    public int getLastPage() {
        return lastPage;
    }

    public void setLastPage(int lastPage) {
        this.lastPage = lastPage;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalData() {
        return totalData;
    }

    public void setTotalData(int totalData) {
        this.totalData = totalData;
    }

    public List<T> getPageData() {
        return pageData;
    }

    public void setPageData(List<T> pageData) {
        this.pageData = pageData;
    }

    @Override
    public String toString() {
        return "PageBeanUtils{" +
                "prePage=" + prePage +
                ", nextPage=" + nextPage +
                ", firstPage=" + firstPage +
                ", lastPage=" + lastPage +
                ", currentPage=" + currentPage +
                ", totalPage=" + totalPage +
                ", pageSize=" + pageSize +
                ", totalData=" + totalData +
                ", pageData=" + pageData +
                '}';
    }
}
